<?php
/**
 * 权限验证
 */

class AuthController extends Controller {

    public $Module = 'crm';
    public $Controller = 'auth';
    public $Action = 'index';
    public $UserConfig = array();
    
    public function __construct() {
        
    }

    public function LoginAction() {
        // 赋值
        $this->Config = Config::GetConfig();
        $this->Assign('Config', $this->Config);
        $this->SetView($this->Module . '/common');
        $this->AddView($this->Module . '/' . $this->Controller); 
        
        echo $this->GetView('login.php');
    }
    
    public function DologinAction(){
        $this->Config = Config::GetConfig();        
        $this->LoadHelper($this->Module. '/' .$this->Controller.'_'.$this->Action);
    }
    
    public function LogoutAction(){
        $this->LoadHelper('MemberHelper');
        $MemberHelper = new MemberHelper();
        if($MemberHelper->logout())            header('Location:/');;
    }
    
    public function GetpwdAction(){
        $this->Config = Config::GetConfig();
        $this->Assign('Config', $this->Config);
        $this->SetView($this->Module . '/common');
        $this->AddView($this->Module . '/' . $this->Controller); 
        
        $this->LoadHelper($this->Module. '/' .$this->Controller.'_'.$this->Action);
    }
}